<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title>idea</title>
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<link rel="stylesheet" href="css/style.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/time.js"></script>
</head>
<body>
	<div class="container">
		<%@ include file="include/top.jsp" %>
	<!--header end-->
		<div class="content">
			<div class="row">
				<div class="span9">
					<div class="document">
						<ul>
							<li><a href=""><i class="icon-fire"></i>想法</a></li>
							<li class="pull-right"><a href="editIdea.jspx"><i class="icon-plus"></i>发表想法</a></li>
						</ul>
					</div>
					<div class="wall">
					<blockquote>
					<c:forEach items="${requestScope.list}" var="idea">
					
					    <h5><a href="idea_comment.jspx?IdeaId=${idea.id}">${idea.idea_title}</a></h5>
						  <p style="font-size:14px;line-height:1.5;">${idea.idea_content}</p>
						  
					<small title="${idea.idea_createtime}" id="${idea.id}"></small></h4>
					<script type="text/javascript">
					  	var endtime = getNow();
					  	var starttime = '${idea.idea_createtime }';
					  	var diftime = getTimeDif(starttime,endtime);
					  	var id = '${idea.id}';
					  	var name = '${idea.employee.name }';
					  	$("#"+id).text(name+diftime);
					</script>
					<c:if test="${sessionScope.employee.id==idea.employee_id }">
					 <a href="editidea.jspx?ideaId=${idea.id }" title="编辑"><i class="icon-pencil"></i></a>
							  
					 <a href="delIdea.jspx?ideaId=${idea.id}" title="删除"><i class="icon-trash"></i></a>
					 </c:if>
				   </c:forEach>
					<c:if test="${empty list}">
					   <li>目前没有任何想法</li>
					</c:if>
						  
					</blockquote>
						
						
						
					</div>
				</div>
				<div class="span3">
				<c:if test="${not empty ideadel }">
							<span style="font-size:10px;color:red">${ideadel}</span>
					</c:if>
					<c:remove var="ideadel" scope="session"/>
				</div>
			</div>
		</div>
		<!--container end-->
		<div class="footer">
			<p>Copyright © 2013 xxx版权所有</p>
		</div>
		<!--footer end-->
	</div>
	
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>